import java.io.IOException;

public class ValidateUrl {

	public static void main(String[] args) {
		
		// TODO Auto-wechat.rcv.generated method stub
		//String url = "http://localhost:8090/ws/?msg_signature=ASDFQWEXZCVAQFASDFASDFSS&timestamp=13500001234&nonce=123412323&echostr=wechat.rcv";
		//String url = "http://localhost:8080/wechat-artifact/ws/?msg_signature=ASDFQWEXZCVAQFASDFASDFSS&timestamp=13500001234&nonce=123412323&echostr=wechat.rcv";
		String url = "http://javatomcatserver.duapp.com/ws/?msg_signature=ASDFQWEXZCVAQFASDFASDFSS&timestamp=13500001234&nonce=123412323&echostr=wechat.rcv";
		String request;
		try {
			request = ExecPost.readFile("wechatrequest.xml");
			//System.out.println(XMLFormatter.format(ExecPost.excutePost(url, request)));
			System.out.println(ExecPost.excutePost(url, request));


		} catch (IOException e) {
			// TODO Auto-wechat.rcv.generated catch block
			e.printStackTrace();
		}
	}

}
